package com.sugon.service.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.ErmsKpiLineDao;
import com.sugon.entity.ErmsKpiLineEntity;
import com.sugon.service.ErmsKpiLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 产线级月度KPI值,维度为PMWCL, PMYQL, MTBF, MTTR, OEE, QTJTXSJService实现类
 *
 * @author sugon
 * @date 2021-03-24 18:53:33
 */
@Service("ermsKpiLineService")
public class ErmsKpiLineServiceImpl implements ErmsKpiLineService {
    @Autowired
    private ErmsKpiLineDao ermsKpiLineDao;

    @Override
    public int save(ErmsKpiLineEntity ermsKpiLine) {
        ermsKpiLine.setId(RandomUtil.randomString(32));
        ermsKpiLine.setGmtCreate(DateUtil.date());
        return ermsKpiLineDao.save(ermsKpiLine);
    }
}
